<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>练习</title>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/vue-router.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<router-link to="/cgb2106">班级</router-link>
			<router-view></router-view>
		</div>
		<template id="class">
			<div>
				<h2>班级:cgb2106</h2>
				<router-link to="/第一排">排数</router-link>
				<router-view></router-view>
			</div>
		</template>
		<template id="row">
			<div>
				<h2>排数:第一排</h2>
				<router-link to="/右半部分">左右部分</router-link>
				<router-view></router-view>
			</div>
		</template>
		<template id="right">
			<div>
				<h2>部分:右半部分</h2>
				<router-link to="/第一个">第一个人</router-link>
				<router-view></router-view>
			</div>
		</template>
		<template id="no">
			<div>
				<h2>第一个:李泽枪</h2>
			</div>
		</template>
		<script>
			let router = new VueRouter({
				routes:[{
					path:"/cgb2106",component:{template:"#class"},
						children:[{
							path:"/第一排",component:{template:"#row"},
								children:[{
									path:"/右半部分",component:{template:"#right"},
										children:[{
											path:"/第一个",component:{template:"#no"}
										}]
								}]
							}]
					}]
			})
			new Vue({
				el : "#app",
				router
			})
		
		</script>
	</body>
</html>
